// wrapper.h

#pragma once

#include "engine.h"
#include "entity/entity.h"
#include "Property.h"

namespace interop {
	using namespace System;
	using namespace System::Windows::Forms;
	using namespace System::Collections::Generic;
	

	public ref class server
	{
		// TODO: Add your methods for this class here.
	public:
//		static Form^ main_form=nullptr;
		static bool need_refresh=false;
		static bool forced_render=false;
		static CodersLab::Windows::Controls::NodesCollection^ SelectedNodes=nullptr;
		static void init_system(IntPtr renderwindow_hwnd,IntPtr mainwindow_hwnd);
		static void update_system();
		static void render_system(bool everything);
		static void exit_system();
		static void fill_treeview(TreeNodeCollection^ nodes);
		static void fill_typetree(TreeNodeCollection^ nodes);
		static void enable_mouse_and_keyboard(bool enable);
		static void load_scene(String^ file_name);
		static void new_scene();
		static void init_scene();
		static void exit_scene();
		static void save_scene(String^ file_name);
		static TreeNode^ new_entity(String^ type_name,TreeNode^ parentNode);
		static void delete_entities(List<EntityTreeNode^>^ entity_list);
		static void reload_scripts();
		static bool log_changed();
		static String^ get_log();
		static void resize_view();
		static void debugtexts_enabled(bool on);
		static void CreatePropertyTable(EntityTreeNode^ node);

/*
		static void set_main_form(Form^ _main_form)
		{
			main_form=_main_form;
		}
		*/
		static void selection_changed(CodersLab::Windows::Controls::NodesCollection^ _SelectedNodes);
	};

}
